package cn.tianyun.pethome.annotation;



import cn.tianyun.pethome.system.service.IPermissionService;
import org.springframework.beans.factory.annotation.Autowired;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;

@WebListener
public class PermissionScanInitListener implements ServletContextListener {
   @Autowired
    IPermissionService permissionService;
    @Override
    public void contextInitialized(ServletContextEvent sce) {
        new Thread(new Runnable() {
            @Override
            public void run() {

             permissionService.innit();
            }
        }).start();
    }
}
